﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace AnQinFrameWorkAPI.Entity.SystemCore.Entity;

/// <summary>
///     角色字段表模型
/// </summary>
[Table("RoleField")]
public class RoleFieldModel
{
    #region 关联

    public virtual MenuFieldModel MenuField { get; set; }

    #endregion

    #region 字段

    /// <summary>
    ///     角色菜单字段id（主键）
    /// </summary>
    [Key]
    [MaxLength(36)]
    public Guid Id { get; set; }

    /// <summary>
    ///     角色id（必填）
    /// </summary>
    [MaxLength(36)]
    public Guid RoleId { get; set; }

    /// <summary>
    ///     菜单id（必填）
    /// </summary>
    [MaxLength(36)]
    public Guid MenuId { get; set; }

    /// <summary>
    ///     菜单字段id（必填）
    /// </summary>
    [MaxLength(36)]
    public Guid MenuFieldId { get; set; }

    /// <summary>
    ///     是否启用
    /// </summary>
    public bool IsEnable { get; set; }

    #endregion
}